package parameter;

import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Iterator;
import java.util.List;
import org.jdom.Document;
import org.jdom.Element;
import org.jdom.JDOMException;
import org.jdom.input.SAXBuilder;
import org.jdom.output.XMLOutputter;

public class TestGetParameter {

	

	public List test() {

		String xmlpath = "library1.xml";
		List wycParameterlist = null;
		SAXBuilder builder = new SAXBuilder(false);
		try {
			Document doc = builder.build(xmlpath);
			Element wycParameter = doc.getRootElement();
			wycParameterlist = wycParameter.getChildren("aa");
			/*for (Iterator iter = wycParameterlist.iterator();iter.hasNext();) {
				Element getStrPar = (Element) iter.next();
				getStrPar.getChild("translateBeginner").setText(Integer.toString(translateBeginner));		
					}*/
			XMLOutputter outputter=new XMLOutputter();
			 outputter.output(doc,new FileOutputStream(xmlpath));

		} catch (JDOMException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}
		return wycParameterlist;
	}
	
}
